package day3;

import day2.pet.Dog;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class ColTest {
    //Collections
    public static void main(String[] args) {
        Dog d[]=new Dog[]{
                new Dog("大黄","公",88,77),
                new Dog("小花花","公",64,88),
                new Dog("小泉","公",23,42),
                new Dog("Mary","母",45,72),
                new Dog("贾斯汀","公",66,99),
                new Dog("比伯","公",44,48)
        };
        List<Dog> list=new ArrayList<>();
        //List<Dog> l2=Arrays.asList(d);
        list.addAll(Arrays.asList(d));
        // System.out.println(list);
        Collections.sort(list);
        for(Dog dd:list){
            System.out.println(dd);
        }
        Dog dogmax=Collections.max(list);
        System.out.println("最大："+dogmax);
    }
}
